<!-- This HTML and Javascript is designed to go into an HTML element in a Cognos Report Studio report page. -->

<!-- Test some Cognos Connection URLs. -->

<a href="https://dwhsep.doemass.org/cognos8/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_folder=iCF0010A72ED54D5782602D19F3815EDC">
Open the Cognos Connection folder where we're developing this interface</a>.

<br/><br/>
<a href="https://dwhsep.doemass.org/cognos8/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_path=%2fcontent%2ffolder%5b%40name%3d%27District%20Folders%27%5d%2ffolder%5b%40name%3d%27Shared%20-%20District%20Report%20Authors%20-%20Not%20ESE%20Validated%27%5d%2ffolder%5b%40name%3d%27CEDU%27%5d%2ffolder%5b%40name%3d%27Indirect%20Reporting%27%5d">
Try the same thing using the folder path</a>.

<br/><br/>
<a href="https://dwhsep.doemass.org/cognos8/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/cc.xts&m_path=/content/folder[@name='District Folders']/folder[@name='Shared - District Report Authors - Not ESE Validated']/folder[@name='CEDU']/folder[@name='Indirect Reporting']">
And again without escaping the path</a>.

<br/><br/>
<a href="https://dwhsep.doemass.org/cognos8/cgi-bin/cognosisapi.dll?b_action=xts.run&m=portal/report-viewer.xts&ui.action=run&ui.object=%2fcontent%2ffolder%5b%40name%3d%27District%20Folders%27%5d%2ffolder%5b%40name%3d%27Shared%20-%20District%20Report%20Authors%20-%20Not%20ESE%20Validated%27%5d%2ffolder%5b%40name%3d%27CEDU%27%5d%2ffolder%5b%40name%3d%27Simple%20Information%27%5d%2freport%5b%40name%3d%27User%20Identity%27%5d&run.outputEncapsulation=URLQueryString">
View your user identity strings from the data warehouse
</a>
<br/><br/>

<!-- Test Javascript's XMLHttpRequest. -->

<script type="text/javascript">

if (! window.XMLHttpRequest)
{
    alert("I'm sorry, your web browser doesn't seem to support XMLHttpRequest, a capability we use on this page.");
}

function displayCognosUserIdentity()
{
    var url;
    url = 'https://dwhsep.doemass.org/cognos8/cgi-bin/cognosisapi.dll';
    url += '?b_action=xts.run&m=portal/launch.xts';
    url += '&ui.tool=CognosViewer';
    url += '&ui.action=run';
    url += "&ui.object=/content/folder[@name='District Folders']/folder[@name='Shared - District Report Authors - Not ESE Validated']/folder[@name='CEDU']/folder[@name='Simple Information']/report[@name='User Identity']";
    url += "&run.outputFormat=XML";
    document.getElementById("response_text").src = url;
    return;
    var httpRequest = new XMLHttpRequest();
    httpRequest.open("GET", url, false);
    httpRequest.send("");
}

</script>

<button type="button" onclick="displayCognosUserIdentity()">Try it with Javascript</button>

<iframe id="response_text">
    <p>Empty iframe.</p>
</iframe>

<br/><br/>

<script type="text/javascript" src="https://dwhsep.doemass.org/cognos8/cognoslaunch.js"></script>

<script type="text/javascript">
function cLaunch()
{
    cognosLaunch('ui.gateway', 'https://dwhsep.doemass.org/cognos8/cgi-bin/cognos.cgi', 
            'ui.tool', 'CognosViewer', 
            'ui.object', "/content/folder[@name='District Folders']/folder[@name='Shared - District Report Authors - Not ESE Validated']/folder[@name='CEDU']/folder[@name='Simple Information']/report[@name='User Identity']", 
            'ui.action', 'run', 
            'ui', 'h1h2h3h4', 
            'run.outputFormat', 'CSV');
}
</script>

<button type="button" onclick="cLaunch()">cognosLaunch</button>
